import { ref, onMounted, nextTick } from 'vue';

export function useMainColor() {
    const mainColor = ref('#ff5000');
    onMounted(() => {
      nextTick(() => {
        const root = document.documentElement || document.body;
        const color = getComputedStyle(root).getPropertyValue('--mainColor');
        if (color) mainColor.value = color.trim();
      });
    });
    return mainColor;
  }